<?php

// no direct access
defined('_JEXEC') or die;

jimport('joomla.application.component.view');

class InfectionControlViewNotifications extends JView {
    protected $items;
    protected $pagination;
    protected $state;
    
    public function display($tpl = null) {
        // We don't need toolbar in the modal window.
        if ($this->getLayout() !== 'modal') {
            $this->addToolbar();
        }
        
        $this->setDocument();
        
        parent::display($tpl);
    }
    
    protected function addToolbar() {
        JToolBarHelper::title(JText::_('COM_INFECTIONCONTROL_NOTIFICATIONS_TITLE'), 'notification.png');
    }
    
    protected function setDocument() {
        $document = JFactory::getDocument();
        $document->addStyleDeclaration('.icon-48-notification {background-image: url(../media/com_infectioncontrol/images/icon-48-notification.png);}');
    }
}